---
title: "Set Filter - Overview"
enterprise: true
description: "Set Filter works like Excel, providing checkboxes to select values from a set."
---

The Set Filter takes inspiration from Excel's AutoFilter and allows filtering on sets of data.

{% imageCaption imagePath="resources/set-filter.png" alt="Set Filter" centered=true /%}

## Set Filter Sections

The Set Filter is comprised of the following sections:

* **[Mini Filter](./filter-set-mini-filter/)**: used to narrow the values available for selection inside the Filter List.
* **Select All**: used to select / deselect all values shown in the Filter List.
* **[Filter List](./filter-set-filter-list/)**: a list of Set Filter Values which can be selected / deselected to set the filter.
* **[Filter Buttons](./filter-applying/#apply-clear-reset-and-cancel-buttons)**: Action buttons that can be optionally added to the bottom of the Set Filter.

## Enabling Set Filters

The Set Filter is the default filter used in AG Grid Enterprise (unless it has been [Suppressed by Default](#suppress-set-filter-by-default) or the `SetFilterModule` has not been registered), but it can also be explicitly configured as shown below:

```{% frameworkTransform=true %}
const gridOptions = {
    columnDefs: [
        // Set Filter is used by default in Enterprise version
        { field: 'athlete', filter: true },
        // explicitly configure column to use the Set Filter
        { field: 'country', filter: 'agSetColumnFilter' },
    ],
}
```

The following example demonstrates how the Set Filter can be enabled. Note the following:

* The **Athlete** column has `filter=true` which defaults to the Set Filter as this example is using AG Grid Enterprise.
* The **Country** column is explicitly configured to use the Set Filter using `filter='agSetColumnFilter'`.
* All other columns are configured to use the [Number Filter](./filter-number/) using `filter='agNumberColumnFilter'`.
* Filters can be accessed by clicking on the filter icon in the [Floating Filters](./floating-filters/).

{% gridExampleRunner title="Enabling Set Filters" name="enabling-set-filters"  exampleHeight=565 /%}

## Suppress Set Filter by Default

When `filter = true`, the Set Filter is used for AG Grid Enterprise by default. To use the [Text Filter](./filter-text/), [Number Filter](./filter-number/) or [Date Filter](./filter-date/) instead based on the [Cell Data Type](./cell-data-types/) (as in AG Grid Community), set the grid option `suppressSetFilterByDefault = true`.
## Set Filter Parameters

Set Filters are configured though the `filterParams` attribute of the column definition (`ISetFilterParams` interface):

{% interfaceDocumentation interfaceName="ISetFilterParams" overrideSrc="filter-set/set-filter-params.json" config={"description":"", "sortAlphabetically":true} /%}

### Updating Set Filter Parameters

When new column definitions are set with updated Set Filter parameters, the Set Filter will update to reflect these. For certain filter parameters, changing the parameter will invalidate the filter model. This will cause the filter to be reset.

The following filter parameters will reset the Set Filter - `treeList`, `treeListPathGetter`, `caseSensitive`, `comparator`, and `excelMode`.

Additionally, a few column definition properties will also reset the Set Filter - `filterValueGetter`, `keyCreator` (unless specified in both the old and new filter parameters), and `valueFormatter` (if no `keyCreator` and the [Cell Data Type](./cell-data-types/#pre-defined-cell-data-types) is not `'number'` or `'text'`).

{% if isFramework("javascript", "angular", "vue") %}
For the parameters above which are functions, define them as constants outside of the column definition to avoid resetting the Set Filter when passing new column definitions.
{% /if %}
{% if isFramework("react") %}
For the parameters above which are functions, memoize the individual functions (e.g. define them via `useCallback` outside of the column definition) to avoid resetting the Set Filter when passing new column definitions.
{% /if %}

## Next Up

Continue to the next section to learn about the [Filter List](./filter-set-filter-list/).
